package com.isoftstone.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.isoftstone.entity.CK_Prescription;
import com.isoftstone.entity.C_Medicine;
import com.isoftstone.entity.C_Prescription;
import com.isoftstone.entity.Inpesction_item;
import com.isoftstone.entity.Patient;
import com.isoftstone.entity.Register;
import com.isoftstone.entity.W_Medicine;
import com.isoftstone.entity.W_Prescription;

public interface DocDao {

	List<Patient> getAllpatient();

	List<C_Medicine> getAllCM();

	Patient getpatientById(@Param("card_id")String card_id);

	C_Medicine getCMById(@Param("cm_id")String cm_id);

	boolean insertCM(@Param("cm_id")String cm_id,@Param("cm_name")String cm_name,@Param("cm_usage")String cm_usage, @Param("guahao_id")String guahao_id, @Param("cm_price")Double cm_price, @Param("cm_num")int cm_num, @Param("cm_amount")Double cm_amount);

	Register getRegisterById(@Param("guahao_id")String guahao_id);

	String getCard_id(@Param("guahao_id")String guahao_id);

	List<C_Prescription> getAllCPById(@Param("guahao_id")String guahao_id);

	C_Prescription getCMYizhu(@Param("guahao_id")String guahao_id, @Param("cm_id")String cm_id);

	boolean updateCMYizhu(@Param("guahao_id")String guahao_id, @Param("cm_id")String cm_id, @Param("cm_yizhu")String cm_yizhu);

	List<W_Medicine> getAllWM();

	List<W_Prescription> getAllWPById(@Param("guahao_id")String guahao_id);

	W_Medicine getWMById(@Param("wm_id")String wm_id);

	W_Prescription getWMYizhu(@Param("guahao_id")String guahao_id, @Param("wm_id")String wm_id);

	boolean updateWMYizhu(@Param("guahao_id")String guahao_id, @Param("wm_id")String wm_id, @Param("wm_yizhu")String wm_yizhu);

	boolean insertWM(@Param("wm_id")String wm_id, @Param("wm_name")String wm_name, @Param("wm_usage")String wm_usage, @Param("guahao_id")String guahao_id, @Param("wm_price")Double wm_price, @Param("wm_num")int wm_num,
			@Param("wm_amount")Double wm_amount);

	boolean deleteCM(@Param("guahao_id")String guahao_id, @Param("cm_id")String cm_id);
	
	boolean deleteWM(@Param("guahao_id")String guahao_id, @Param("wm_id")String wm_id);
	
	List<Inpesction_item> getAllCK();

	List<CK_Prescription> getAllCKById(@Param("guahao_id")String guahao_id);

	Inpesction_item getCKById(@Param("ck_id")String ck_id);

	CK_Prescription getCKYizhu(@Param("guahao_id")String guahao_id, @Param("ck_id")String ck_id);

	boolean updateCKYizhu(@Param("guahao_id")String guahao_id, @Param("ck_id")String ck_id, @Param("ck_yizhu")String ck_yizhu);

	boolean insertCK(@Param("ii_id")String ck_id, @Param("ck_name")String ck_name, @Param("ck_dept")String ck_dept, @Param("guahao_id")String guahao_id, @Param("ck_price")Double ck_price, @Param("ck_num")int ck_num,
			@Param("ck_amount")Double ck_amount);
	
	boolean deleteCK(@Param("guahao_id")String guahao_id, @Param("ck_id")String ck_id);

	List<C_Medicine> searchCM(@Param("cm_name")String cm_name);

	List<W_Medicine> searchWM(@Param("wm_name")String wm_name);
	
	List<Inpesction_item> searchCK(@Param("ii_name")String ii_name);
}
